package com.chuangke.sms.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.chuangke.common.http.HttpResult;
import com.chuangke.sms.model.SMSModel;
import com.chuangke.sms.sender.dydxwg.DydxwgSender;
import com.chuangke.sms.service.SMSService;

@RestController
@RequestMapping("sms")
public class SMSController {

	@Autowired
	private DydxwgSender dydxwgSender;
	@Autowired
	private SMSService smsService ;
	
	@GetMapping(value = "/list1")
	public HttpResult list1() {
		SMSModel model = new SMSModel();
		model.setUserId("");
		model.setTelphone("18615671351");
		model.setMessage("您申请的物料已到货，可以到系统进行物料申请。");
		
		smsService.send(model);
		
		return HttpResult.ok(model.toString());
	}
	

	@GetMapping(value = "/list")
	public HttpResult list() {
		SMSModel model = new SMSModel();
		model.setUserId("");
		model.setTelphone("18615671351");
		model.setMessage("您申请的物料已到货，可以到系统进行物料申请。");
		
		dydxwgSender.send(model);
		
		return HttpResult.ok(model.toString());
	}
	
	

}
